<div style="float:right;">[<%= link_to "view as graph", graphs_logged_controller_logged_actions_path(@logged_controller), :class => "caps_link" %>
]</div>
<h1>Logged Controller: <%= @logged_controller.title_name %></h1>

<center>

<table class="parent_list">
  <tr class="title_row">
    <th rowspan="2">Action Name <%= sort_arrows("name", @sortby, @dir) %></th>
    <th rowspan="2">Total Hits <%= sort_arrows("count", @sortby, @dir) %></th>
    <th colspan="3">Average times (in seconds)</th>
  </tr>
  <tr class="title_row">
    <th class="small">Completion <%= sort_arrows("completion_time", @sortby, @dir) %></th>
    <th class="small">Render <%= sort_arrows("render_time", @sortby, @dir) %></th>
    <th class="small">DB <%= sort_arrows("db_time", @sortby, @dir) %></th>
  </tr>
  <% for logged_action in @logged_controller.logged_actions_sorted_by(@sortby, @dir) -%>
  <tr>
    <td>
      <div style="float:right; margin-left: 10px;">
        <%= link_to "zoom", log_entries_url(:logged_action_id => logged_action.id), :class => "caps_link" %>
      </div>
      <%= logged_action.name %> 
    </td>
    <td class="numbers"><%= logged_action.count %></td>
    <td class="numbers"><%= logged_action.average_completion_time.to_decimal_string %></td>
    <td class="numbers"><%= logged_action.average_render_time.to_decimal_string %></td>
    <td class="numbers"><%= logged_action.average_db_time.to_decimal_string %></td>
  </tr>
  <% end -%>  
</table>

</center>
